package com.biz.primus.ms.order.stream;

import com.biz.primus.model.oms.stream.OrderStateChannel;
import org.springframework.cloud.stream.annotation.Input;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.SubscribableChannel;

/**
 * @author yanweijin
 * @date 2017/11/7
 */
public interface OrderStateSink extends OrderStateChannel {

	/**
	 * 接收begin状态的订单消息
	 * @return
	 */
	@Input(ORDER_BEGIN)
	SubscribableChannel orderBeginInput();

	/**
	 * 接收outbound状态的订单消息
	 * @return
	 */
	@Input(ORDER_OUTBOUND)
	SubscribableChannel orderOutboundInput();

	/**
	 * 接收finished状态的订单消息
	 * @return
	 */
	@Input(ORDER_FINISHED)
	SubscribableChannel orderFinishedInput();

	/**
	 * 接收订单取消
	 * @return
	 */
	@Input(ORDER_CANCEL)
	MessageChannel orderCancelInput();


//	@Input(REFUND)
//	SubscribableChannel refund();
}
